<template>
<div style="font-size: 12px;" v-if="device">
	<div v-if="device.deviceBase" style="border: 1px solid #dfe6ec;">
	 	<div style="padding-top: 10px;padding-bottom: 10px;padding-left: 10px;">
			<el-row :gutter="24" style="margin-bottom: 10px"> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'SN：  ' + device.deviceBase.snNum}} </el-col> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'设备类型：  ' + device.deviceBase.typeName}} </el-col> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'品牌：  ' + device.deviceBase.brandName}} </el-col> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'设备状态：  ' + device.deviceBase.state}} </el-col> 
			</el-row>
			<el-row :gutter="24" style=""> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'型号：  ' + device.deviceBase.modelName}} </el-col> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'规格：  ' + device.deviceBase.specName}} </el-col>
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'服务代码：  ' + device.deviceServer.serviceCode}} </el-col> 
			</el-row>
		</div>	
	</div>
	<div v-if="device.deviceUnit" style="border: 1px solid #dfe6ec;">
	 	<div style="padding-top: 10px;padding-bottom: 10px;padding-left: 10px;">
			<div v-for="unit in device.deviceUnit">
				<el-row v-if="unit.unitType === '1'" :gutter="24" style="padding-bottom: 10px;"> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'CPU品牌：  ' + unit.brandName}} </el-col> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'CPU核数：  ' + unit.capacity}} </el-col> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'数量：  ' + unit.amount}} </el-col> 
				</el-row>
				<el-row v-if="unit.unitType === '2'" :gutter="24" style="padding-bottom: 10px;"> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'内存品牌：  ' + unit.brandName}} </el-col> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'内存容量：  ' + unit.capacity}} </el-col>
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'数量：  ' + unit.amount}} </el-col> 
				</el-row>
				<el-row v-if="unit.unitType === '3'" :gutter="24" style="padding-bottom: 10px;"> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'网卡品牌：  ' + unit.brandName}} </el-col> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'数量：  ' + unit.amount}} </el-col> 
				</el-row>
				<el-row v-if="unit.unitType === '4'" :gutter="24" style="padding-bottom: 10px;"> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'电源品牌：  ' + unit.brandName}} </el-col> 
					<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'数量：  ' + unit.amount}} </el-col> 
				</el-row>
				<el-row v-if="unit.unitType === '5'" :gutter="24" style="padding-bottom: 10px;"> 
					<el-col :xs="8" :sm="8" :md="8" :lg="8"> {{'硬盘品牌：  ' + unit.brandName}} </el-col> 
					<el-col :xs="4" :sm="4" :md="4" :lg="4"> {{'硬盘容量：  ' + unit.capacity}} </el-col> 
					<el-col :xs="4" :sm="4" :md="4" :lg="4"> {{'数量：  ' + unit.amount}} </el-col> 
				</el-row>											
			</div>
		</div>	
	</div>
	<div v-if="device.deviceServer" style="border: 1px solid #dfe6ec;">
	 	<div v-if="device.deviceBase.state === '1'" style="padding-top: 10px;padding-bottom: 10px;padding-left: 10px;">
			<el-row :gutter="24" style="margin-bottom: 10px"> 
				<el-col :xs="10" :sm="10" :md="10" :lg="10"> {{'设备用途：  ' + device.deviceServer.purpose}} </el-col> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'IPMI：  ' + device.deviceServer.ipmiAddr}} </el-col> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'管理网地址：  ' + device.deviceServer.manageIp}} </el-col> 
			</el-row>
			<el-row :gutter="24" style="margin-bottom: 10px"> 
				<el-col :xs="24" :sm="24" :md="24" :lg="24"> {{'系统型号：  ' + device.deviceServer.sysModel}} </el-col>
			</el-row>
			<el-row :gutter="24" style="margin-bottom: 10px"> 
				<el-col :xs="24" :sm="24" :md="24" :lg="24"> {{'主机名：  ' + device.deviceServer.hostName}} </el-col>
			</el-row>
			<el-row v-for="ip in device.deviceIp" :key="ip" :gutter="24" style="margin-bottom: 10px"> 
				<el-col :xs="24" :sm="24" :md="24" :lg="24"> {{ip.ip}} </el-col>
			</el-row>						
		</div>
		<div v-else>
			<el-row :gutter="24" style="padding-top: 10px;padding-bottom: 10px;padding-left: 10px;"> 
				<el-col :xs="6" :sm="6" :md="6" :lg="6"> {{'管理网地址：  ' + device.deviceServer.manageIp}} </el-col> 
			</el-row>			
		</div>
	</div>	
</div>
</template>
<style>
</style>
<script>
export default {
	name : 'drop-bitmap-server',
	props : {
		device : {
			type : Object,
			default : {}
		},
	},
	computed : {

	},
	data () {
		return {

		}
	}
}
</script>